package com.ysq.storage.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 货品信息对象 sys_product
 *
 * @author ysq
 * @date 2025-08-13
 */
public class Product extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 货品id */
    @TableId
    private Long productId;

    /** 分类唯一标识 */
    @Excel(name = "分类唯一标识")
    private Long categoryId;

    /** 货品名称 */
    @Excel(name = "货品名称")
    private String productName;

    /** 分类名称 */
    @Excel(name = "分类名称")
    private String categoryName;

    /** 计量单位 */
    @Excel(name = "计量单位")
    private String unit;

    /** 货品条码 */
    @Excel(name = "货品条码")
    private String barcode;

    /** 主图URL */
    @Excel(name = "主图URL")
    private String imageUrl;

    /** 库存数量 */
    @Excel(name = "库存数量")
    private Long stockQuantity;

    /** 进价 */
    @Excel(name = "进价")
    private BigDecimal purchasePrice;

    /** 售价 */
    @Excel(name = "售价")
    private BigDecimal sellingPrice;

    /** 生产日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date productionDate;

    /** 保质期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保质期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationDate;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 创建人ID */
    @Excel(name = "创建人ID")
    private Long createUserId;

    /** 修改人ID */
    @Excel(name = "修改人ID")
    private Long updateUserId;

    public void setProductId(Long productId)
    {
        this.productId = productId;
    }

    public Long getProductId()
    {
        return productId;
    }

    public void setCategoryId(Long categoryId)
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId()
    {
        return categoryId;
    }

    public void setProductName(String productName)
    {
        this.productName = productName;
    }

    public String getProductName()
    {
        return productName;
    }

    public void setCategoryName(String categoryName)
    {
        this.categoryName = categoryName;
    }

    public String getCategoryName()
    {
        return categoryName;
    }

    public void setUnit(String unit)
    {
        this.unit = unit;
    }

    public String getUnit()
    {
        return unit;
    }

    public void setBarcode(String barcode)
    {
        this.barcode = barcode;
    }

    public String getBarcode()
    {
        return barcode;
    }

    public void setImageUrl(String imageUrl)
    {
        this.imageUrl = imageUrl;
    }

    public String getImageUrl()
    {
        return imageUrl;
    }

    public void setStockQuantity(Long stockQuantity)
    {
        this.stockQuantity = stockQuantity;
    }

    public Long getStockQuantity()
    {
        return stockQuantity;
    }

    public void setPurchasePrice(BigDecimal purchasePrice)
    {
        this.purchasePrice = purchasePrice;
    }

    public BigDecimal getPurchasePrice()
    {
        return purchasePrice;
    }

    public void setSellingPrice(BigDecimal sellingPrice)
    {
        this.sellingPrice = sellingPrice;
    }

    public BigDecimal getSellingPrice()
    {
        return sellingPrice;
    }

    public void setProductionDate(Date productionDate)
    {
        this.productionDate = productionDate;
    }

    public Date getProductionDate()
    {
        return productionDate;
    }

    public void setExpirationDate(Date expirationDate)
    {
        this.expirationDate = expirationDate;
    }

    public Date getExpirationDate()
    {
        return expirationDate;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setCreateUserId(Long createUserId)
    {
        this.createUserId = createUserId;
    }

    public Long getCreateUserId()
    {
        return createUserId;
    }

    public void setUpdateUserId(Long updateUserId)
    {
        this.updateUserId = updateUserId;
    }

    public Long getUpdateUserId()
    {
        return updateUserId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("productId", getProductId())
            .append("categoryId", getCategoryId())
            .append("productName", getProductName())
            .append("categoryName", getCategoryName())
            .append("unit", getUnit())
            .append("barcode", getBarcode())
            .append("imageUrl", getImageUrl())
            .append("stockQuantity", getStockQuantity())
            .append("purchasePrice", getPurchasePrice())
            .append("sellingPrice", getSellingPrice())
            .append("productionDate", getProductionDate())
            .append("expirationDate", getExpirationDate())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("createUserId", getCreateUserId())
            .append("updateUserId", getUpdateUserId())
            .toString();
    }
}
